package jp.co.cyberagent.stf;

import android.os.Looper;
import android.util.Log;

/**
 * Created by Maing on 2019/3/22.
 */
public class MiniLib {
	public static native int get_banner(byte[] data);
	public static native byte[] get_cap(int quality);
	public static native byte[] get_cap_no_yuv(int quality);
	public static native int init_cap(int realInfo_width, int realInfo_height, int desiredInfo_width, int desiredInfo_height, int desiredInfo_orientation);
	public static native int release_cap();
	public static native int init_touch();
	public static native void set_touch(byte[] sz);
	public static native byte[] get_touch_limits();
	public static native byte[] get_screen(int quality);
	public static native int set_rotation(int realInfo_width, int realInfo_height, int desiredInfo_width, int desiredInfo_height, int desiredInfo_orientation);
	public static native int set_quality(int quality);
	public static native void enable_debug_info(boolean enable);
	public static native void enable_touch_debug_info(boolean enable);
	public static native byte[] get_cap_null(int quality);
	
	static Looper looper;
	public static void main(String[] args) {
		int pid = android.os.Process.myPid();
		int uid = android.os.Process.myUid();
		int tid = android.os.Process.myTid();
		
//		int ppid = android.os.Process.myPpid();
		Log.d("Maing", "---------------------");
		Log.d("Maing", "---------------------" + "pid: " + pid + " uid: " + uid + " tid: " + tid);
		if (Looper.myLooper() == null)
		{
			Looper.prepare();
		}
		
		looper = Looper.myLooper();
		System.loadLibrary("miniserver");
		
		
		Looper.loop();
	}
	
//	static {
//		System.loadLibrary("minicap");
//	}
}